<!DOCTYPE html><html lang="zh-CN" theme-mode="dark"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>VIM | Xpera's blog</title><link rel="icon" type="image/x-icon" href="/favicon.ico"><link rel="preload" as="font" crossorigin="anonymous" href="/font/Bender.ttf"><link rel="preload" as="font" crossorigin="anonymous" href="/font/BenderLight.ttf"><link rel="preload" as="font" crossorigin="anonymous" href="/font/JetBrainsMono-Regular.woff2"><link rel="stylesheet" href="/css/arknights.css"><style>@font-face {
  font-family: Bender;
  src: local('Bender'), url("/font/Bender.ttf"), url("/font/Bender.otf");
}
@font-face {
  font-family: BenderLight;
  src: local('BenderLight'), url("/font/BenderLight.ttf");
}
@font-face {
  font-family: 'JetBrains Mono';
  src: local('JetBrains Mono'), url('/font/JetBrainsMono-Regular.woff2') format('woff2');
}
</style><script>var config = {"root":"/","search":{"preload":false,"activeHolder":"Enter here","blurHolder":"Search","noResult":"Data \"$0\" not found"},"code":{"codeInfo":"$0 - $1 lines","copy":"copy"}}</script><link type="text/css" rel="stylesheet" href="/lib/encrypt/hbe.style.css"><link type="text/css" rel="stylesheet" href="//unpkg.com/lightgallery@2.7.1/css/lightgallery.css"><link type="text/css" rel="stylesheet" href="//unpkg.com/lightgallery@2.7.1/css/lg-zoom.css"><link type="text/css" rel="stylesheet" href="//unpkg.com/lightgallery@2.7.1/css/lg-thumbnail.css"><link type="text/css" rel="stylesheet" href="/lib/fontawesome/css/all.min.css"><script>if (window.localStorage.getItem('theme-mode') === 'light')
 document.documentElement.setAttribute('theme-mode', 'light')
if (window.localStorage.getItem('theme-mode') === 'dark')
 document.documentElement.setAttribute('theme-mode', 'dark')</script><style>:root {
 --dark-background: url('/img/bg.png');
 --light-background: url('/img/bk.png');
 --theme-encrypt-confirm: 'confirm'
}</style><script defer src="/js/arknights.js"></script><script defer src="/js/search.js"></script><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><script async src="//unpkg.com/valine/dist/Valine.min.js"></script><script defer type="module">import mermaid from '//unpkg.com/mermaid@10.5.0/dist/mermaid.esm.mjs';
window.mermaid = mermaid;
code.paintMermaid();
</script><script async src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.6.1/MathJax.js"></script><script>MathJax.Hub.Config({
  menuSettings: {
    zoom: "None"
  },
  showMathMenu: false,
  jax: ["input/TeX","output/CommonHTML"],
  extensions: ["tex2jax.js"],
  TeX: {
    extensions: ["AMSmath.js","AMSsymbols.js"],
    equationNumbers: {
      autoNumber: "AMS"
    }
  },
  tex2jax: {
    inlineMath: [["\\(", "\\)"]],
    displayMath: [["\\[", "\\]"]]
  }
});
</script><script async src="//unpkg.com/lightgallery@2.7.1/lightgallery.min.js"></script><script async src="//unpkg.com/lightgallery@2.7.1/plugins/zoom/lg-zoom.min.js"></script><script async src="//unpkg.com/lightgallery@2.7.1/plugins/thumbnail/lg-thumbnail.min.js"></script><script async src="/lib/encrypt/hbe.js"></script><script async src="/js/pjax.js"></script><script class="pjax-js">reset= () => {new Valine({
 el: '#valine'
 , appId: 'suQjT631ZvEF7gN5beiU0z9L-gzGzoHsz'
 , appKey: 'P8Tbqv8Eusi6wAGsHXcwFPEr' , placeholder: 'This comment is sent by Penguin Logistics.'
 , path: window.location.pathname
});document.querySelector('.lg-container')?.remove()
lightGallery(document.getElementById('post-bg'), {
  plugins: [lgZoom,lgThumbnail],
  selector: '.item-img'})}</script><script>window.addEventListener("load",() => {pjax = new Pjax({
 cacheBust: false,
 selectors: ['title','article','#aside-block','.pjax-js','data-pjax','.busuanzi'],
 switches: {'article': Pjax.switches.sideBySide},
 switchesOptions: {
   'article': {
     classNames: {
       remove: "pjax-out",
       add: "pjax-in"
     }
   }
 }
});
document.addEventListener("pjax:complete", reset);document.addEventListener('pjax:success', _ => bszCaller.fetch(
 "//busuanzi.ibruce.info/busuanzi?jsonpCallback=BusuanziCallback", a => {
  bszTag.texts(a),
  bszTag.shows()
}));reset()})</script><meta name="generator" content="Hexo 7.2.0"></head><body><div class="loading" style="opacity: 0;"><div class="loadingBar left"></div><div class="loadingBar right"></div></div><main><header class="closed"><div class="navBtn"><i class="navBtnIcon"><span class="navBtnIconBar"></span><span class="navBtnIconBar"></span><span class="navBtnIconBar"></span></i></div><nav><div class="navItem" id="search-header"><span class="navItemTitle"><input autocomplete="off" autocorrect="off" autocapitalize="none" placeholder="Search" spellcheck="false" maxlength="50" type="text" id="search-input"></span></div><div class="navItem" id="search-holder"></div><div class="search-popup" tabindex="0"><div id="search-result"></div></div><ol class="navContent"><li class="navItem"><a class="navBlock" href="/"><span class="navItemTitle">Home</span></a></li><li class="navItem"><a class="navBlock" href="/about/"><span class="navItemTitle">About</span></a></li><li class="navItem"><a class="navBlock" href="/music/"><span class="navItemTitle">Music</span></a></li><li class="navItem"><a class="navBlock" href="/links/"><span class="navItemTitle">Links</span></a></li><li class="navItem"><a class="navBlock" href="/info/"><span class="navItemTitle">Info</span></a></li><li class="navItem" matchdata="categories,tags"><a class="navBlock" href="/archives/"><span class="navItemTitle">Archives</span></a></li></ol></nav></header><article><div id="post-bg"><div id="post-title"><h1>VIM</h1><div id="post-info"><span>First Post: <div class="control"><time datetime="2023-11-04T02:37:28.000Z" id="date"> 2023-11-04</time></div></span><br><span>Last Update: <div class="control"><time datetime="2024-04-13T07:19:05.358Z" id="updated"> 2024-04-13</time></div></span><br><span>Word Count: <div class="control">2.5k</div></span><br><span>Read Time: <div class="control">12 min</div></span><br><span id="busuanzi_container_page_pv">Page View: <span class="control" id="busuanzi_value_page_pv">loading...</span></span></div></div><hr><div id="post-content"><p>[TOC]</p>
<hr />
<p>此处有一个空白符   </p>
<span class="hide"><object><p>本文章是根据一位B站UP主（theCW）的vim笔记</p></object></span>
<p>theCW视频链接</p>
<p>  <a
target="_blank" rel="noopener" href="https://www.bilibili.com/video/av55498503/">上古神器Vim：从恶言相向到爱不释手
- 终极Vim教程01 - 带你配置属于你自己的最强IDE_哔哩哔哩_bilibili</a></p>
<p>  <a
target="_blank" rel="noopener" href="https://www.bilibili.com/video/av55664166/">上古神器Vim：进阶使用/配置、必备插件介绍
- 终极Vim教程02 - 带你配置属于你自己的最强IDE_哔哩哔哩_bilibili</a></p>
<p>  <a
target="_blank" rel="noopener" href="https://www.bilibili.com/video/BV1r4411G7de/">「妈妈不会告诉你的Vim技巧」
-Vim终极教程03 - 带你配置属于你自己的最强IDE_哔哩哔哩_bilibili</a></p>
<h1 id="安装vim"><a href="#安装vim" class="headerlink" title="安装vim"></a>安装vim</h1>
<div class="admonition expand-box adm-success fold"
        >
        <div class="ex-header">
            <i class='i-status'></i>
            <i class='i-adm i-success'></i>
            <span class="ex-title">CentOS</span>
        </div>
        <div class="ex-content"><p>​ <strong>sudo yum -y install vim</strong></p>
</div>
        </div>
<div class="admonition expand-box adm-success fold"
        >
        <div class="ex-header">
            <i class='i-status'></i>
            <i class='i-adm i-success'></i>
            <span class="ex-title">Ubuntu</span>
        </div>
        <div class="ex-content"><p>​ <strong>sudo apt-get install vim</strong></p>
</div>
        </div>
<div class="admonition expand-box adm-success fold"
        >
        <div class="ex-header">
            <i class='i-status'></i>
            <i class='i-adm i-success'></i>
            <span class="ex-title">Arch</span>
        </div>
        <div class="ex-content"><p>​ <strong>sudo pacman -S vim</strong></p>
</div>
        </div>
<h1 id="打开vim"><a href="#打开vim" class="headerlink" title="打开vim"></a>打开VIM</h1>
<p>  <strong>vim</strong>或<strong>vim [file]</strong>
//把[file]替换成你想打开的文件</p>
<p>  <u><strong>例子：</strong></u></p>
<p>  <u>vim c.txt //用vim打开名叫c的txt文件</u></p>
<h1 id="vim命令推荐自己尝试一下"><a href="#vim命令推荐自己尝试一下" class="headerlink" title="vim命令推荐自己尝试一下"></a>VIM命令(推荐自己尝试一下)</h1>
<h2 id="vim中的模式"><a href="#vim中的模式" class="headerlink" title="vim中的模式"></a>  VIM中的模式</h2>
<p>      VIM中有三种比较常用的模式：</p>
<p>           <strong>NORMAL MODE // 普通模式</strong>
<em>也是默认打开的模式 大部分命令都是在普通模式下使用的</em></p>
<p>           <strong>INSERT MODE // 写入模式</strong></p>
<p>           <strong>VISUAL MODE // 可视模式</strong></p>
<p>​</p>
<h2 id="普通模式中的命令"><a href="#普通模式中的命令" class="headerlink" title="普通模式中的命令"></a>  普通模式中的命令</h2>
<p>        <strong>操作 + 动作</strong> <em>(operation +
motion)</em></u></p>
<p>           <u><strong>例子 dh d 操作(delete删除) h 动作(左)</strong>
<em>连起来就是“向左删除一个字符”</em></u></p>
<p>        <u><strong>命令可以连用(带冒号的)
也可以带一个!表示强制...</strong></u></p>
<p>           <u><strong>例子 :wq保存(:w)并退出(:q)</strong></u></p>
<p>           <u><strong>:q! (quit!)强制退出vim</strong></u></p>
<p>        ESC键 进入默认模式</p>
<h3 id="进入插入模式"><a href="#进入插入模式" class="headerlink" title="进入插入模式"></a>     进入插入模式</h3>
<p>        i键 (insert)在文字的前方进入写入模式</p>
<p>        I键 (大写i)在句子的开头插入</p>
<p>        a键 (append)在文字的后方进入写入模式</p>
<p>        A键 (大写A)在句子的末尾插入</p>
<p>        o键 (open a new
line)在当前行的下方开启一个新行并进入插入模式</p>
<p>        O键 (大写o)在当前行的上方开启一个新行并进入插入模式</p>
<h3 id="命令"><a href="#命令" class="headerlink" title="命令"></a>     命令</h3>
<p>        :w (write)保存文件</p>
<p>        :q (quit)退出vim</p>
<p>       :e [路径] <em>//把[路径]换成你自己的路径</em> 打开文件</p>
<h4 id="操作"><a href="#操作" class="headerlink" title="操作"></a>     操作</h4>
<p>        d (delete)实际上是剪切</p>
<p>           <u>dd剪切一行</u></p>
<p>           <u>d + 数字 + 方向
<em>剪切[你的方向]的[你的数字]个字符</em></u></p>
<p>              <u>例子</u></p>
<p>           <u>d3h 向左删除三个字符</u></p>
<p>           <u>dh 向左删除一个字符</u></p>
<p>        p (paste)粘贴你刚刚复制的字符</p>
<p>        y (yank)复制</p>
<p>           <u>例子</u></p>
<p>              <u>y3h 向左复制三个字符</u></p>
<p>              <u>yh 向左复制一个字符</u></p>
<p>        c (change)删除完成后进入写入操作<em>(和d操作相同)</em></p>
<p>        0 回到这行的开头</p>
<p>        u 撤销</p>
<p>        n 下一条搜索 <strong><em>N 上一条搜索</em></strong></p>
<p>       gg 移到开头</p>
<p>       G 移到最后一行</p>
<p>​</p>
<h4 id="动作"><a href="#动作" class="headerlink" title="动作"></a>     动作</h4>
<p>        h左 j下 k上 l左
<strong>*移动光标**</strong>（可以按照自己的喜好更改 后面再说）*</p>
<p>           <u><strong>如果要一次性移动多行可以输入 [你要多少行] +
[你移动光标方向按键]</strong></u></p>
<p>           <u><em>这个也是前面说的操作 + 动作</em></u></p>
<p>              <u><strong><em>例子</em></strong> 10k
向上(k)移动十行(10)</u></p>
<p>        f (find)查找 f + 你要查找的字母</p>
<p>           <u><strong><em>fv 查找字母v</em></strong></u></p>
<h2 id="可视模式命令和普通模式相同"><a href="#可视模式命令和普通模式相同" class="headerlink" title="可视模式命令和普通模式相同"></a>  可视模式(命令和普通模式相同)</h2>
<p>       <strong><em>在普通模式下按下v键进入可视模式(普通可视)</em></strong></p>
<p>       <strong><em>在普通模式下按下V键(大写v)进入可视模式(行可视)</em></strong></p>
<p>       <strong><em>在普通模式下按下ctrl+v进入可视模式(块可视)</em></strong></p>
<h3 id="normal指令"><a href="#normal指令" class="headerlink" title="normal指令"></a>    normal指令</h3>
<p>       在可视模式下输入<strong>: normal</strong> <strong>+
你在默认模式下的命令</strong> 就会在可视模式下执行<strong><em>(v/
v-line/ v-block都可以 我懒得写其他的例子了 自己尝试吧)</em></strong></p>
<p>         例子 <u>:normal Idef-md
//把选中行(v-line<strong>行可视</strong>)的前方插入(I)def-md<em>(中间不能有空格
要不然会把空格一块加上)</em></u></p>
<h1 id="按键重映射"><a href="#按键重映射" class="headerlink" title="按键重映射"></a>按键重映射</h1>
<p>        .<strong>vimrc是vim的配置文件
后面的配置都是放在这个文件下</strong></p>
<h2 id="打开.vimrc"><a href="#打开.vimrc" class="headerlink" title="打开.vimrc"></a>   打开.vimrc</h2>
<p>        mkdir .vim
<em>//创建.vim文件夹.vimrc要放在这个文件夹下</em></p>
<p>        cd .vim <em>//进入.vim文件夹</em></p>
<p>        vim ~/.vimrc <em>//如果没有这个文件的话
vim会打开时自动创建</em></p>
<h2 id="编辑.vimrc"><a href="#编辑.vimrc" class="headerlink" title="编辑.vimrc"></a>  编辑.vimrc</h2>
<p>        <u>注意: 你自己改完键之后上面的<strong>操作/
动作</strong>会变成你自己绑的键</u></p>
<figure class="highlight vim"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br></pre></td><td class="code"><pre><code class="hljs vim"><span class="hljs-keyword">let</span> mapleader=<span class="hljs-string">&quot; &quot;</span><br><span class="hljs-keyword">noremap</span> <span class="hljs-symbol">&lt;LEADER&gt;</span><span class="hljs-symbol">&lt;CR&gt;</span> :<span class="hljs-keyword">noh</span><span class="hljs-symbol">&lt;CR&gt;</span><br><br><span class="hljs-keyword">syntax</span> <span class="hljs-keyword">on</span><br><span class="hljs-keyword">set</span> <span class="hljs-keyword">number</span><br><span class="hljs-keyword">set</span> relativenumber<br><span class="hljs-keyword">set</span> cursorline<br><span class="hljs-keyword">set</span> wrap<br><span class="hljs-keyword">set</span> showcmd<br><span class="hljs-keyword">set</span> wildmenu<br><br><span class="hljs-keyword">set</span> hlsearch<br>exec <span class="hljs-string">&quot;nohlsearch&quot;</span><br><span class="hljs-keyword">set</span> incsearch<br><span class="hljs-keyword">set</span> ignorecase<br><span class="hljs-keyword">set</span> smartcase<br><br><span class="hljs-keyword">set</span> nocompatible<br><span class="hljs-keyword">filetype</span> <span class="hljs-keyword">on</span><br><span class="hljs-keyword">filetype</span> <span class="hljs-built_in">indent</span> <span class="hljs-keyword">on</span><br><span class="hljs-keyword">filetype</span> plugin <span class="hljs-keyword">on</span><br><span class="hljs-keyword">filetype</span> plugin <span class="hljs-built_in">indent</span> <span class="hljs-keyword">on</span><br><span class="hljs-keyword">set</span> mouse=<span class="hljs-keyword">a</span><br><span class="hljs-keyword">set</span> encoding=utf-<span class="hljs-number">8</span><br><span class="hljs-keyword">let</span> &amp;t_ut=<span class="hljs-string">&#x27;&#x27;</span><br><span class="hljs-keyword">set</span> expandtab<br><span class="hljs-keyword">set</span> tabstop=<span class="hljs-number">2</span><br><span class="hljs-keyword">set</span> <span class="hljs-built_in">shiftwidth</span>=<span class="hljs-number">2</span><br><span class="hljs-keyword">set</span> softtabstop=<span class="hljs-number">2</span><br><span class="hljs-keyword">set</span> <span class="hljs-keyword">list</span><br><span class="hljs-keyword">set</span> listchars=<span class="hljs-keyword">tab</span>:▸\ ,trail:▫<br><span class="hljs-keyword">set</span> scrolloff=<span class="hljs-number">5</span><br><span class="hljs-keyword">set</span> tw=<span class="hljs-number">0</span><br><span class="hljs-keyword">set</span> indentexpr=<br><span class="hljs-keyword">set</span> backspace=<span class="hljs-built_in">indent</span>,eol,start<br><span class="hljs-keyword">set</span> foldmethod=<span class="hljs-built_in">indent</span><br><span class="hljs-keyword">set</span> <span class="hljs-built_in">foldlevel</span>=<span class="hljs-number">99</span><br><span class="hljs-keyword">let</span> &amp;t_SI = <span class="hljs-string">&quot;\&lt;Esc&gt;]50;CursorShape=1\x7&quot;</span><br><span class="hljs-keyword">let</span> &amp;t_SR = <span class="hljs-string">&quot;\&lt;Esc&gt;]50;CursorShape=2\x7&quot;</span><br><span class="hljs-keyword">let</span> &amp;t_EI = <span class="hljs-string">&quot;\&lt;Esc&gt;]50;CursorShape=0\x7&quot;</span><br><span class="hljs-keyword">set</span> laststatus=<span class="hljs-number">2</span><br><span class="hljs-keyword">set</span> autochdir<br><span class="hljs-keyword">au</span> BufReadPost * <span class="hljs-keyword">if</span> <span class="hljs-built_in">line</span>(<span class="hljs-string">&quot;&#x27;\&quot;&quot;</span>) &gt; <span class="hljs-number">1</span> &amp;&amp; <span class="hljs-built_in">line</span>(<span class="hljs-string">&quot;&#x27;\&quot;&quot;</span>) &lt;= <span class="hljs-built_in">line</span>(<span class="hljs-string">&quot;$&quot;</span>) | <span class="hljs-keyword">exe</span> <span class="hljs-string">&quot;normal! g&#x27;\&quot;&quot;</span> | <span class="hljs-keyword">endif</span><br><br><span class="hljs-comment">&quot; N上一条搜索 n下一条搜索</span><br><span class="hljs-keyword">noremap</span> = nzz<br><span class="hljs-keyword">noremap</span> + Nzz<br><br><span class="hljs-comment">&quot; j左 k下 l右 i上</span><br><span class="hljs-keyword">noremap</span> <span class="hljs-keyword">j</span> <span class="hljs-symbol">&lt;left&gt;</span><br><span class="hljs-keyword">noremap</span> <span class="hljs-keyword">l</span> <span class="hljs-symbol">&lt;right&gt;</span><br><span class="hljs-keyword">noremap</span> <span class="hljs-keyword">k</span> <span class="hljs-symbol">&lt;down&gt;</span><br><span class="hljs-keyword">noremap</span> i <span class="hljs-symbol">&lt;up&gt;</span><br><span class="hljs-keyword">noremap</span> J <span class="hljs-number">5</span><span class="hljs-symbol">&lt;left&gt;</span><br><span class="hljs-keyword">noremap</span> L <span class="hljs-number">5</span><span class="hljs-symbol">&lt;right&gt;</span><br><span class="hljs-keyword">noremap</span> K <span class="hljs-number">5</span><span class="hljs-symbol">&lt;down&gt;</span><br><span class="hljs-keyword">noremap</span> I <span class="hljs-number">5</span><span class="hljs-symbol">&lt;up&gt;</span><br><br><span class="hljs-keyword">noremap</span> <span class="hljs-symbol">&lt;C-j&gt;</span> <span class="hljs-number">0</span><br><span class="hljs-keyword">noremap</span> <span class="hljs-symbol">&lt;C-l&gt;</span> $<br><br><span class="hljs-comment">&quot; T进入插入模式</span><br><span class="hljs-keyword">noremap</span> t <span class="hljs-symbol">&lt;insert&gt;</span><br><span class="hljs-keyword">noremap</span> T I<br><br><span class="hljs-comment">&quot; S保存文件</span><br><span class="hljs-keyword">map</span> s <span class="hljs-symbol">&lt;nop&gt;</span><br><span class="hljs-keyword">map</span> S :<span class="hljs-keyword">w</span><span class="hljs-symbol">&lt;CR&gt;</span><br><span class="hljs-keyword">map</span> S! :w!<span class="hljs-symbol">&lt;CR&gt;</span><br><span class="hljs-keyword">map</span> ; :<br><br><span class="hljs-comment">&quot; 设置vs为向右分屏 vp为向左分屏</span><br><span class="hljs-keyword">map</span> <span class="hljs-keyword">vs</span> :<span class="hljs-keyword">set</span> splitright<span class="hljs-symbol">&lt;CR&gt;</span>:<span class="hljs-keyword">vsplit</span><span class="hljs-symbol">&lt;CR&gt;</span><br><span class="hljs-keyword">map</span> vp :<span class="hljs-keyword">set</span> nosplitright<span class="hljs-symbol">&lt;CR&gt;</span>:<span class="hljs-keyword">vsplit</span><span class="hljs-symbol">&lt;CR&gt;</span><br><br><span class="hljs-comment">&quot; 设置ss为向上分屏 sp为向下分屏</span><br><span class="hljs-keyword">map</span> ss :<span class="hljs-keyword">set</span> nosplitbelow<span class="hljs-symbol">&lt;CR&gt;</span>:<span class="hljs-keyword">split</span><span class="hljs-symbol">&lt;CR&gt;</span><br><span class="hljs-keyword">map</span> <span class="hljs-keyword">sp</span> :<span class="hljs-keyword">set</span> splitbelow<span class="hljs-symbol">&lt;CR&gt;</span>:<span class="hljs-keyword">split</span><span class="hljs-symbol">&lt;CR&gt;</span><br><br><span class="hljs-comment">&quot; 键盘上下左右键(不是jkli)更改分屏大小</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;down&gt;</span> :<span class="hljs-keyword">res</span> +<span class="hljs-number">5</span><span class="hljs-symbol">&lt;CR&gt;</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;up&gt;</span> :<span class="hljs-keyword">res</span> -<span class="hljs-number">5</span><span class="hljs-symbol">&lt;CR&gt;</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;right&gt;</span> :<span class="hljs-keyword">vertical</span> <span class="hljs-keyword">resize</span>-<span class="hljs-number">5</span><span class="hljs-symbol">&lt;CR&gt;</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;left&gt;</span> :<span class="hljs-keyword">vertical</span> <span class="hljs-keyword">resize</span>+<span class="hljs-number">5</span><span class="hljs-symbol">&lt;CR&gt;</span><br><br><span class="hljs-comment">&quot; tu打开新标签</span><br><span class="hljs-keyword">map</span> <span class="hljs-keyword">tu</span> :<span class="hljs-keyword">tabe</span><span class="hljs-symbol">&lt;CR&gt;</span><br><br><span class="hljs-comment">&quot; ctrl-i  ctrl-k 切换标签页</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;C-i&gt;</span> :-<span class="hljs-keyword">tabnext</span><span class="hljs-symbol">&lt;CR&gt;</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;C-k&gt;</span> :+<span class="hljs-keyword">tabnext</span><span class="hljs-symbol">&lt;CR&gt;</span><br><br><span class="hljs-comment">&quot; 按下sh上下分屏 sv左右分屏</span><br><span class="hljs-keyword">map</span> <span class="hljs-keyword">sv</span> <span class="hljs-symbol">&lt;C-w&gt;</span>t<span class="hljs-symbol">&lt;C-w&gt;</span>H<br><span class="hljs-keyword">map</span> <span class="hljs-keyword">sh</span> <span class="hljs-symbol">&lt;C-w&gt;</span>t<span class="hljs-symbol">&lt;C-w&gt;</span>K<br><br><span class="hljs-comment">&quot; 分屏时按空格 + jkli移动窗口光标</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;LEADER&gt;</span>i <span class="hljs-symbol">&lt;C-w&gt;</span><span class="hljs-keyword">k</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;LEADER&gt;</span><span class="hljs-keyword">k</span> <span class="hljs-symbol">&lt;C-w&gt;</span><span class="hljs-keyword">j</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;LEADER&gt;</span><span class="hljs-keyword">j</span> <span class="hljs-symbol">&lt;C-w&gt;</span>h<br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;LEADER&gt;</span><span class="hljs-keyword">l</span> <span class="hljs-symbol">&lt;C-w&gt;</span><span class="hljs-keyword">l</span><br><br><span class="hljs-comment">&quot; Q退出文件</span><br><span class="hljs-keyword">map</span> Q :q<span class="hljs-symbol">&lt;CR&gt;</span><br><span class="hljs-keyword">map</span> Q! :q!<span class="hljs-symbol">&lt;CR&gt;</span><br><br><span class="hljs-comment">&quot; 重载vimrc</span><br><span class="hljs-keyword">map</span> R :<span class="hljs-keyword">source</span> $MYVIMRC<span class="hljs-symbol">&lt;CR&gt;</span><br><br><span class="hljs-comment">&quot; 插件(yay!!!)</span><br><span class="hljs-keyword">call</span> plug#begin(<span class="hljs-string">&#x27;~/.vim/plugged&#x27;</span>)<br>Plug <span class="hljs-string">&#x27;mhinz/vim-startify&#x27;</span><br><br>Plug <span class="hljs-string">&#x27;vim-airline/vim-airline&#x27;</span><br>Plug <span class="hljs-string">&#x27;ghifarit53/tokyonight-vim&#x27;</span><br><br><span class="hljs-comment">&quot; File navigation</span><br>Plug <span class="hljs-string">&#x27;scrooloose/nerdtree&#x27;</span>, &#123; <span class="hljs-string">&#x27;on&#x27;</span>: <span class="hljs-string">&#x27;NERDTreeToggle&#x27;</span>  &#125;<br>Plug <span class="hljs-string">&#x27;Xuyuanp/nerdtree-git-plugin&#x27;</span><br><br><span class="hljs-comment">&quot; Taglist</span><br>Plug <span class="hljs-string">&#x27;preservim/tagbar&#x27;</span>, &#123; <span class="hljs-string">&#x27;on&#x27;</span>: <span class="hljs-string">&#x27;TagbarOpenAutoClose&#x27;</span>  &#125;<br><br><span class="hljs-comment">&quot; Error checking</span><br>Plug <span class="hljs-string">&#x27;dense-analysis/ale&#x27;</span><br><br><span class="hljs-comment">&quot; Auto Complete</span><br>Plug <span class="hljs-string">&#x27;neoclide/coc.nvim&#x27;</span>, &#123;<span class="hljs-string">&#x27;branch&#x27;</span>: <span class="hljs-string">&#x27;release&#x27;</span>&#125;<br><br><span class="hljs-comment">&quot; Undo Tree</span><br>Plug <span class="hljs-string">&#x27;mbbill/undotree/&#x27;</span><br><br><span class="hljs-comment">&quot; Other visual enhancement</span><br>Plug <span class="hljs-string">&#x27;nathanaelkane/vim-indent-guides&#x27;</span><br>Plug <span class="hljs-string">&#x27;itchyny/vim-cursorword&#x27;</span><br><br><span class="hljs-comment">&quot; Git</span><br>Plug <span class="hljs-string">&#x27;rhysd/conflict-marker.vim&#x27;</span><br>Plug <span class="hljs-string">&#x27;tpope/vim-fugitive&#x27;</span><br>Plug <span class="hljs-string">&#x27;mhinz/vim-signify&#x27;</span><br>Plug <span class="hljs-string">&#x27;gisphm/vim-gitignore&#x27;</span>, &#123; <span class="hljs-string">&#x27;for&#x27;</span>: [<span class="hljs-string">&#x27;gitignore&#x27;</span>, <span class="hljs-string">&#x27;vim-plug&#x27;</span>]  &#125;<br><br><span class="hljs-comment">&quot; HTML, CSS, JavaScript, PHP, JSON, etc.</span><br>Plug <span class="hljs-string">&#x27;elzr/vim-json&#x27;</span><br>Plug <span class="hljs-string">&#x27;hail2u/vim-css3-syntax&#x27;</span><br>Plug <span class="hljs-string">&#x27;spf13/PIV&#x27;</span>, &#123; <span class="hljs-string">&#x27;for&#x27;</span> :[<span class="hljs-string">&#x27;php&#x27;</span>, <span class="hljs-string">&#x27;vim-plug&#x27;</span>]  &#125;<br>Plug <span class="hljs-string">&#x27;gko/vim-coloresque&#x27;</span>, &#123; <span class="hljs-string">&#x27;for&#x27;</span>: [<span class="hljs-string">&#x27;vim-plug&#x27;</span>, <span class="hljs-string">&#x27;php&#x27;</span>, <span class="hljs-string">&#x27;html&#x27;</span>, <span class="hljs-string">&#x27;javascript&#x27;</span>, <span class="hljs-string">&#x27;css&#x27;</span>, <span class="hljs-string">&#x27;less&#x27;</span>]  &#125;<br>Plug <span class="hljs-string">&#x27;pangloss/vim-javascript&#x27;</span>, &#123; <span class="hljs-string">&#x27;for&#x27;</span> :[<span class="hljs-string">&#x27;javascript&#x27;</span>, <span class="hljs-string">&#x27;vim-plug&#x27;</span>]  &#125;<br>Plug <span class="hljs-string">&#x27;mattn/emmet-vim&#x27;</span><br><br><span class="hljs-comment">&quot; Python</span><br>Plug <span class="hljs-string">&#x27;vim-scripts/indentpython.vim&#x27;</span><br><br><span class="hljs-comment">&quot; Markdown</span><br>Plug <span class="hljs-string">&#x27;iamcco/markdown-preview.nvim&#x27;</span>, &#123; <span class="hljs-string">&#x27;do&#x27;</span>: &#123; -&gt; mkdp#util#install_sync() &#125;, <span class="hljs-string">&#x27;for&#x27;</span> :[<span class="hljs-string">&#x27;markdown&#x27;</span>, <span class="hljs-string">&#x27;vim-plug&#x27;</span>]  &#125;<br>Plug <span class="hljs-string">&#x27;dhruvasagar/vim-table-mode&#x27;</span>, &#123; <span class="hljs-string">&#x27;on&#x27;</span>: <span class="hljs-string">&#x27;TableModeToggle&#x27;</span>  &#125;<br>Plug <span class="hljs-string">&#x27;vimwiki/vimwiki&#x27;</span><br><br><span class="hljs-comment">&quot; Bookmarks</span><br>Plug <span class="hljs-string">&#x27;kshenoy/vim-signature&#x27;</span><br><br><span class="hljs-comment">&quot; Other useful utilities</span><br>Plug <span class="hljs-string">&#x27;terryma/vim-multiple-cursors&#x27;</span><br>Plug <span class="hljs-string">&#x27;junegunn/goyo.vim&#x27;</span> <span class="hljs-comment">&quot; distraction free writing mode</span><br>Plug <span class="hljs-string">&#x27;tpope/vim-surround&#x27;</span> <span class="hljs-comment">&quot; type ysks&#x27; to wrap the word with &#x27;&#x27; or typecs&#x27;` to change &#x27;word&#x27; to `word`</span><br>Plug <span class="hljs-string">&#x27;godlygeek/tabular&#x27;</span> <span class="hljs-comment">&quot; type ;Tabularize /= to align the =</span><br>Plug <span class="hljs-string">&#x27;gcmt/wildfire.vim&#x27;</span> <span class="hljs-comment">&quot; in Visual mode, type i&#x27; to select all text in &#x27;&#x27;, or type i) i] i&#125; ip</span><br>Plug <span class="hljs-string">&#x27;scrooloose/nerdcommenter&#x27;</span> <span class="hljs-comment">&quot; in &lt;space&gt;cc to comment a line</span><br><br><span class="hljs-comment">&quot; Dependencies</span><br>Plug <span class="hljs-string">&#x27;MarcWeber/vim-addon-mw-utils&#x27;</span><br>Plug <span class="hljs-string">&#x27;kana/vim-textobj-user&#x27;</span><br>Plug <span class="hljs-string">&#x27;fadein/vim-FIGlet&#x27;</span><br><br><br><span class="hljs-keyword">call</span> plug#end()<br><br><span class="hljs-keyword">set</span> termguicolors<br><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:tokyonight_style</span> = <span class="hljs-string">&#x27;night&#x27;</span> <span class="hljs-comment">&quot; available: night, storm</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:tokyonight_enable_italic</span> = <span class="hljs-number">1</span><br><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:tokyonight_transparent_background</span> = <span class="hljs-number">1</span><br><span class="hljs-keyword">colorscheme</span> tokyonight<br><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-comment">&quot; === NERDTree</span><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-keyword">map</span> ff :NERDTreeToggle<span class="hljs-symbol">&lt;CR&gt;</span><br><span class="hljs-keyword">let</span> NERDTreeMapOpenExpl = <span class="hljs-string">&quot;&quot;</span><br><span class="hljs-keyword">let</span> NERDTreeMapUpdir = <span class="hljs-string">&quot;&quot;</span><br><span class="hljs-keyword">let</span> NERDTreeMapUpdirKeepOpen = <span class="hljs-string">&quot;l&quot;</span><br><span class="hljs-keyword">let</span> NERDTreeMapOpenSplit = <span class="hljs-string">&quot;&quot;</span><br><span class="hljs-keyword">let</span> NERDTreeOpenVSplit = <span class="hljs-string">&quot;&quot;</span><br><span class="hljs-keyword">let</span> NERDTreeMapActivateNode = <span class="hljs-string">&quot;i&quot;</span><br><span class="hljs-keyword">let</span> NERDTreeMapOpenInTab = <span class="hljs-string">&quot;o&quot;</span><br><span class="hljs-keyword">let</span> NERDTreeMapPreview = <span class="hljs-string">&quot;&quot;</span><br><span class="hljs-keyword">let</span> NERDTreeMapCloseDir = <span class="hljs-string">&quot;n&quot;</span><br><span class="hljs-keyword">let</span> NERDTreeMapChangeRoot = <span class="hljs-string">&quot;y&quot;</span><br><br><br><span class="hljs-comment">&quot; ==</span><br><span class="hljs-comment">&quot; == NERDTree-git</span><br><span class="hljs-comment">&quot; ==</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:NERDTreeIndicatorMapCustom</span> = &#123;<br>    \ <span class="hljs-string">&quot;Modified&quot;</span>  : <span class="hljs-string">&quot;✹&quot;</span>,<br>    \ <span class="hljs-string">&quot;Staged&quot;</span>    : <span class="hljs-string">&quot;✚&quot;</span>,<br>    \ <span class="hljs-string">&quot;Untracked&quot;</span> : <span class="hljs-string">&quot;✭&quot;</span>,<br>    \ <span class="hljs-string">&quot;Renamed&quot;</span>   : <span class="hljs-string">&quot;➜&quot;</span>,<br>    \ <span class="hljs-string">&quot;Unmerged&quot;</span>  : <span class="hljs-string">&quot;═&quot;</span>,<br>    \ <span class="hljs-string">&quot;Deleted&quot;</span>   : <span class="hljs-string">&quot;✖&quot;</span>,<br>    \ <span class="hljs-string">&quot;Dirty&quot;</span>     : <span class="hljs-string">&quot;✗&quot;</span>,<br>    \ <span class="hljs-string">&quot;Clean&quot;</span>     : <span class="hljs-string">&quot;✔&quot;</span>,<br>    \ <span class="hljs-string">&quot;Unknown&quot;</span>   : <span class="hljs-string">&quot;?&quot;</span><br>    \ &#125;<br><br><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-comment">&quot; === ale</span><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">b:ale_linters</span> = [<span class="hljs-string">&#x27;pylint&#x27;</span>]<br><span class="hljs-keyword">let</span> <span class="hljs-variable">b:ale_fixers</span> = [<span class="hljs-string">&#x27;autopep8&#x27;</span>, <span class="hljs-string">&#x27;yapf&#x27;</span>]<br><br><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-comment">&quot; === Taglist</span><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;silent&gt;</span> T :TagbarOpenAutoClose<span class="hljs-symbol">&lt;CR&gt;</span><br><br><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-comment">&quot; === MarkdownPreview</span><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_auto_start</span> = <span class="hljs-number">0</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_auto_close</span> = <span class="hljs-number">1</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_refresh_slow</span> = <span class="hljs-number">0</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_command_for_global</span> = <span class="hljs-number">0</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_open_to_the_world</span> = <span class="hljs-number">0</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_open_ip</span> = <span class="hljs-string">&#x27;&#x27;</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_browser</span> = <span class="hljs-string">&#x27;chromium&#x27;</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_echo_preview_url</span> = <span class="hljs-number">0</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_browserfunc</span> = <span class="hljs-string">&#x27;&#x27;</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_preview_options</span> = &#123;<br>    \ <span class="hljs-string">&#x27;mkit&#x27;</span>: &#123;&#125;,<br>    \ <span class="hljs-string">&#x27;katex&#x27;</span>: &#123;&#125;,<br>    \ <span class="hljs-string">&#x27;uml&#x27;</span>: &#123;&#125;,<br>    \ <span class="hljs-string">&#x27;maid&#x27;</span>: &#123;&#125;,<br>    \ <span class="hljs-string">&#x27;disable_sync_scroll&#x27;</span>: <span class="hljs-number">0</span>,<br>    \ <span class="hljs-string">&#x27;sync_scroll_type&#x27;</span>: <span class="hljs-string">&#x27;middle&#x27;</span>,<br>    \ <span class="hljs-string">&#x27;hide_yaml_meta&#x27;</span>: <span class="hljs-number">1</span><br>    \ &#125;<br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_markdown_css</span> = <span class="hljs-string">&#x27;&#x27;</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_highlight_css</span> = <span class="hljs-string">&#x27;&#x27;</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_port</span> = <span class="hljs-string">&#x27;&#x27;</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:mkdp_page_title</span> = <span class="hljs-string">&#x27;「$&#123;name&#125;」&#x27;</span><br><br><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-comment">&quot; === vim-table-mode</span><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;LEADER&gt;</span><span class="hljs-keyword">tm</span> :TableModeToggle<span class="hljs-symbol">&lt;CR&gt;</span><br><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-comment">&quot; === Python-syntax</span><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:python_highlight_all</span> = <span class="hljs-number">1</span><br><span class="hljs-comment">&quot; let g:python_slow_sync = 0</span><br><br><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-comment">&quot; === vim-indent-guide</span><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:indent_guides_guide_size</span> = <span class="hljs-number">1</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:indent_guides_start_level</span> = <span class="hljs-number">2</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:indent_guides_enable_on_vim_startup</span> = <span class="hljs-number">1</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:indent_guides_color_change_percent</span> = <span class="hljs-number">1</span><br>silent! <span class="hljs-keyword">unmap</span> <span class="hljs-symbol">&lt;LEADER&gt;</span>ig<br><span class="hljs-keyword">autocmd</span> WinEnter * silent! <span class="hljs-keyword">unmap</span> <span class="hljs-symbol">&lt;LEADER&gt;</span>ig<br><br><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-comment">&quot; === Goyo</span><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-keyword">map</span> <span class="hljs-symbol">&lt;LEADER&gt;</span>gy :Goyo<span class="hljs-symbol">&lt;CR&gt;</span><br><br><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-comment">&quot; === vim-signiture</span><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:SignatureMap</span> = &#123;<br>        \ <span class="hljs-string">&#x27;Leader&#x27;</span>             :  <span class="hljs-string">&quot;m&quot;</span>,<br>        \ <span class="hljs-string">&#x27;PlaceNextMark&#x27;</span>      :  <span class="hljs-string">&quot;m,&quot;</span>,<br>        \ <span class="hljs-string">&#x27;ToggleMarkAtLine&#x27;</span>   :  <span class="hljs-string">&quot;m.&quot;</span>,<br>        \ <span class="hljs-string">&#x27;PurgeMarksAtLine&#x27;</span>   :  <span class="hljs-string">&quot;dm-&quot;</span>,<br>        \ <span class="hljs-string">&#x27;DeleteMark&#x27;</span>         :  <span class="hljs-string">&quot;dm&quot;</span>,<br>        \ <span class="hljs-string">&#x27;PurgeMarks&#x27;</span>         :  <span class="hljs-string">&quot;dm/&quot;</span>,<br>        \ <span class="hljs-string">&#x27;PurgeMarkers&#x27;</span>       :  <span class="hljs-string">&quot;dm?&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoNextLineAlpha&#x27;</span>  :  <span class="hljs-string">&quot;m&lt;LEADER&gt;&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoPrevLineAlpha&#x27;</span>  :  <span class="hljs-string">&quot;&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoNextSpotAlpha&#x27;</span>  :  <span class="hljs-string">&quot;m&lt;LEADER&gt;&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoPrevSpotAlpha&#x27;</span>  :  <span class="hljs-string">&quot;&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoNextLineByPos&#x27;</span>  :  <span class="hljs-string">&quot;&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoPrevLineByPos&#x27;</span>  :  <span class="hljs-string">&quot;&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoNextSpotByPos&#x27;</span>  :  <span class="hljs-string">&quot;mn&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoPrevSpotByPos&#x27;</span>  :  <span class="hljs-string">&quot;mp&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoNextMarker&#x27;</span>     :  <span class="hljs-string">&quot;&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoPrevMarker&#x27;</span>     :  <span class="hljs-string">&quot;&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoNextMarkerAny&#x27;</span>  :  <span class="hljs-string">&quot;&quot;</span>,<br>        \ <span class="hljs-string">&#x27;GotoPrevMarkerAny&#x27;</span>  :  <span class="hljs-string">&quot;&quot;</span>,<br>        \ <span class="hljs-string">&#x27;ListLocalMarks&#x27;</span>     :  <span class="hljs-string">&quot;m/&quot;</span>,<br>        \ <span class="hljs-string">&#x27;ListLocalMarkers&#x27;</span>   :  <span class="hljs-string">&quot;m?&quot;</span><br>        \ &#125;<br><br><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-comment">&quot; === Undotree</span><br><span class="hljs-comment">&quot; ===</span><br><span class="hljs-keyword">let</span> <span class="hljs-variable">g:undotree_DiffAutoOpen</span> = <span class="hljs-number">0</span><br><span class="hljs-keyword">map</span> L :UndotreeToggle<span class="hljs-symbol">&lt;CR&gt;</span><br><br></code></pre></td></tr></table></figure>
<h1 id="neovim"><a href="#neovim" class="headerlink" title="neovim"></a>NEOVIM</h1>
<p>    我的nvim配置是借鉴<span class="hide"><object><p>照抄</p></object></span>油管上的<strong>devaslife</strong>这位大神的配置</p>
<p>    <a target="_blank" rel="noopener" href="https://www.youtube.com/watch?v=fFHlfbKVi30">Effective
Neovim setup for web development towards 2024</a></p>
<p>    我的配置文件</p>
<p>        <a target="_blank" rel="noopener" href="https://gitee.com/as_12/neovim_config">t
t/neovim_config (gitee.com)</a></p>
<p>     devaslife的配置文件</p>
<p>        <a
target="_blank" rel="noopener" href="https://github.com/craftzdog/dotfiles-public">craftzdog/dotfiles-public:
My personal dotfiles (github.com)</a></p>
<div id="paginator"></div></div><div id="post-footer"><div id="pages" style="justify-content: flex-start"><div class="footer-link" style="width: 50%;text-align:right;border-right:1px #fe2 solid"><a href="/post/b2a17991.html">← Next yabai</a></div></div></div><div id="comments"><div id="valine"></div></div></div><div class="bottom-btn"><div><a class="i-top" id="to-top" onClick="scrolls.scrolltop();" title="To Top" style="opacity: 0; display: none;">∧ </a><a class="i-index" id="to-index" href="#toc-div" title="To Catalog">≡</a><a class="i-color" id="color-mode" onClick="colorMode.change()" title="Change Theme"></a></div></div></article><aside><div id="about"><a href="/" id="logo"><img src="https://ooo.0x0.ooo/2024/04/30/OpcgYY.png" alt="Logo"></a><h1 id="Dr"><a href="/">Xpera</a></h1><div id="description"><p></p></div><div id="social-links"><a class="social" target="_blank" rel="noopener" href="https://github.com/tanhe1324"><i class="fab fa-github" alt="GitHub"></i></a><a class="social" target="_blank" rel="noopener" href="https://space.bilibili.com/39392888"><i class="fa-brands fa-bilibili" alt="BiliBili"></i></a></div></div><div id="aside-block"><div id="toc-div"><h1>Catalog</h1><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%AE%89%E8%A3%85vim"><span class="toc-number">1.</span> <span class="toc-text">安装vim</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%89%93%E5%BC%80vim"><span class="toc-number">2.</span> <span class="toc-text">打开VIM</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#vim%E5%91%BD%E4%BB%A4%E6%8E%A8%E8%8D%90%E8%87%AA%E5%B7%B1%E5%B0%9D%E8%AF%95%E4%B8%80%E4%B8%8B"><span class="toc-number">3.</span> <span class="toc-text">VIM命令(推荐自己尝试一下)</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#vim%E4%B8%AD%E7%9A%84%E6%A8%A1%E5%BC%8F"><span class="toc-number">3.1.</span> <span class="toc-text">  VIM中的模式</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%99%AE%E9%80%9A%E6%A8%A1%E5%BC%8F%E4%B8%AD%E7%9A%84%E5%91%BD%E4%BB%A4"><span class="toc-number">3.2.</span> <span class="toc-text">  普通模式中的命令</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%BF%9B%E5%85%A5%E6%8F%92%E5%85%A5%E6%A8%A1%E5%BC%8F"><span class="toc-number">3.2.1.</span> <span class="toc-text">     进入插入模式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%91%BD%E4%BB%A4"><span class="toc-number">3.2.2.</span> <span class="toc-text">     命令</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%93%8D%E4%BD%9C"><span class="toc-number">3.2.2.1.</span> <span class="toc-text">     操作</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%8A%A8%E4%BD%9C"><span class="toc-number">3.2.2.2.</span> <span class="toc-text">     动作</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%AF%E8%A7%86%E6%A8%A1%E5%BC%8F%E5%91%BD%E4%BB%A4%E5%92%8C%E6%99%AE%E9%80%9A%E6%A8%A1%E5%BC%8F%E7%9B%B8%E5%90%8C"><span class="toc-number">3.3.</span> <span class="toc-text">  可视模式(命令和普通模式相同)</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#normal%E6%8C%87%E4%BB%A4"><span class="toc-number">3.3.1.</span> <span class="toc-text">    normal指令</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%8C%89%E9%94%AE%E9%87%8D%E6%98%A0%E5%B0%84"><span class="toc-number">4.</span> <span class="toc-text">按键重映射</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%89%93%E5%BC%80.vimrc"><span class="toc-number">4.1.</span> <span class="toc-text">   打开.vimrc</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%BC%96%E8%BE%91.vimrc"><span class="toc-number">4.2.</span> <span class="toc-text">  编辑.vimrc</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#neovim"><span class="toc-number">5.</span> <span class="toc-text">NEOVIM</span></a></li></ol></div></div><footer><nobr><span class="icp-title">ICP</span><a class="icp-content" target="_blank" rel="noopener" href="https://beian.miit.gov.cn/">没备案（悲 哼哼哼啊啊啊啊啊！）</a></nobr><br><nobr>Published with <a target="_blank" rel="noopener" href="http://hexo.io">Hexo</a></nobr><wbr><nobr> Theme <a target="_blank" rel="noopener" href="https://github.com/Yue-plus/hexo-theme-arknights">Arknights</a></nobr><wbr><nobr> by <a target="_blank" rel="noopener" href="https://github.com/Yue-plus">Yue_plus</a></nobr></footer></aside></main><canvas id="canvas-dust"></canvas></body></html>